<template>
  <div class="gooddec">
    <h4>{{ dec.title }}</h4>
    <hr>
    <div class="content" v-html="dec.content">

    </div>
  </div>
</template>

<script>
  export default {
    data(){
      return{
        id:this.$route.params.id,
        dec:{}
      }
    },
    created(){
      this.getdec();
    },
    methods:{
      getdec(){
        this.$http.get('api/goods/getdesc/'+this.id).then( result => {
          if(result.body.status === 0 ){
            this.dec = result.body.message[0]
          }
        } )
      }
    }
  }
</script>

<style lang="scss" scped>
  .gooddec{
    padding: 4px;
    h4{
      font-size:16px;
      text-align: center;
    }
    .content{
      margin: 5px 0;
      font-size: 14px
    }
    img{
      width: 100%!important;
      height:auto!important;
      display: block;
    }
    p{
      margin: 0;
      padding: 0
    }
  }
</style>